<table>
<%if @worklogs.length > 0-%>
  <tr>
    <th>&nbsp;</th>
    <th>When</th>
    <th>From</th>
    <th>Project</th>
    <th>Duration</th>
    <th>Description</th>
  </tr>
<%else-%>
  <tr>
   <td colspan="5">No worklogs! Start working dude!</td>
  </tr>
<%end-%>	

<% for worklog in @worklogs %>
  <tr>
    <td><%= link_to_destroy(worklog)%></td>
    <td><%=h fmt_date(worklog.done_at) %></td>
    <td><%=h fmt_user_time(worklog.done_at) %></td>
    <td><%=h worklog.assignment.project_full %></td>
    <td><%=h fmt_duration(worklog.duration) %></td>
    <td>
     <span><%= fmt_description(worklog.description, worklog.project.issue_tracker) %></span>
    </td>
    <td><%= link_to 'Edit', :action => 'edit', :id => worklog %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :action => "list", :page => @worklog_pages.current.previous } if @worklog_pages.current.previous %>
<%= link_to 'Next page', { :action => "list", :page => @worklog_pages.current.next } if @worklog_pages.current.next %> 
